local wukuang = fk.CreateSkill{
    name = "ym2__wukuang",
    tags = {Skill.Compulsory}
}
Fk:loadTranslationTable{
    ["ym2__wukuang"] = "武狂",
    [":ym2__wukuang"] = "锁定技，你使用无色牌无距离和次数限制，且结算后翻倍手牌。",
}
wukuang:addEffect(fk.CardUseFinished,{
    can_trigger = function (self, event, target, player, data)
        return player == target and player:hasSkill(wukuang.name) and data.card.color == Card.NoColor and player:getHandcardNum() > 0
    end,
    on_cost = Util.TrueFunc,
    on_use = function (self, event, target, player, data)
        player:drawCards(player:getHandcardNum(),wukuang.name)
    end,
})
wukuang:addEffect(fk.DrawInitialCards,{
    can_refresh = function (self, event, target, player, data)
        return target == player and player:hasSkill(wukuang.name) and data and data.num > 0
    end,
    on_refresh = function (self, event, target, player, data)
        local cardIds = {}
        for i = 1, data.num+2, 1 do
            if math.random() < 0.16 then
                table.insertTableIfNeed(cardIds,player.room:getCardsFromPileByRule("spear"))
                break
            else
                if i == data.num+2 then
                    table.insertTableIfNeed(cardIds,player.room:getCardsFromPileByRule("spear"))
                else
                    table.insertTableIfNeed(cardIds,player.room:getCardsFromPileByRule("^spear"))
                end
            end
        end
        if #cardIds > 0 then
            data.fix_ids = data.fix_ids or {}
            table.insertTableIfNeed(data.fix_ids,cardIds)
        end
    end,
})
wukuang:addEffect("targetmod", {
    bypass_times = function(self, player, skill, scope, card)
        return card and card.color == Card.NoColor and player:hasSkill(wukuang.name)
    end,
    bypass_distances =  function(self, player, skill, card)
        return card and card.color == Card.NoColor and player:hasSkill(wukuang.name)
    end,
})
return wukuang